/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package EntityState;

import java.io.Serializable;
import java.util.List;

/**
 *
 * @author James
 */
public class ItemState implements Serializable {
    private long    id;
    private String  name;
    private String  description;
    protected int     type;
    protected int     lastMonthNumOfBuyers;
    protected int     numOfBuyers;  // Number of people bought this item, this one is for checking which item is the most popular
    protected boolean selling;
    protected boolean active;
    protected boolean deleted;
    protected long    createdDate;
    private ItemDetailsState       latestItemDetails;
    private List<ItemDetailsState> listOfItemDetails;
    private ItemCategoryState      theCategory;
    private List<FileState>        listOfPictures;

    public ItemState(long id, String name, int type) {
        this.id   = id;
        this.name = name;
        this.type = type;
    }
    
    public ItemState(long id, String name, int type, ItemDetailsState latestItemDetails) {
        this.id   = id;
        this.name = name;
        this.type = type;
        this.latestItemDetails = latestItemDetails;
    }
    
    public ItemState(long id, String name,  int type, ItemCategoryState theCategory) {
        this.id          = id;
        this.name        = name;
        this.type        = type;
        this.theCategory = theCategory;
    }

    public ItemState(long id, String name, String description, int lastMonthNumOfBuyers, int numOfBuyers, boolean active, long createdDate, ItemDetailsState latestItemDetails) {
        this.id                = id;
        this.name              = name;
        this.description       = description;
        this.lastMonthNumOfBuyers = lastMonthNumOfBuyers;
        this.numOfBuyers       = numOfBuyers;
        this.active            = active;
        this.createdDate       = createdDate;
        this.latestItemDetails = latestItemDetails;
    }
    
    public ItemState(long id, String name, String description, int lastMonthNumOfBuyers, int numOfBuyers, long createdDate, ItemDetailsState latestItemDetails) {
        this.id             = id;
        this.name           = name;
        this.description    = description;
        this.lastMonthNumOfBuyers = lastMonthNumOfBuyers;
        this.numOfBuyers    = numOfBuyers;
        this.createdDate    = createdDate;
        this.latestItemDetails = latestItemDetails;
    }
    
    public ItemState(long id, String name, String description, int lastMonthNumOfBuyers, int numOfBuyers, boolean active, long createdDate, ItemDetailsState latestItemDetails, List<FileState> listOfPictures) {
        this.id             = id;
        this.name           = name;
        this.description    = description;
        this.lastMonthNumOfBuyers = lastMonthNumOfBuyers;
        this.numOfBuyers    = numOfBuyers;
        this.active         = active;
        this.createdDate    = createdDate;
        this.latestItemDetails    = latestItemDetails;
        this.listOfPictures = listOfPictures;
    }
    
    public ItemState(long id, String name, String description, int lastMonthNumOfBuyers, int numOfBuyers, long createdDate, ItemDetailsState latestItemDetails, List<FileState> listOfPictures) {
        this.id             = id;
        this.name           = name;
        this.description    = description;
        this.lastMonthNumOfBuyers = lastMonthNumOfBuyers;
        this.numOfBuyers    = numOfBuyers;
        this.createdDate    = createdDate;
        this.latestItemDetails    = latestItemDetails;
        this.listOfPictures = listOfPictures;
    }

    public ItemState(long id, String name, String description, int discount, int lastMonthNumOfBuyers, int numOfBuyers, int price, int redeemPrice, int additionalLoyaltyPoint, boolean active, boolean deleted, long createdDate, List<ItemState> subItems, ItemCategoryState theCategory) {
        this.id             = id;
        this.name           = name;
        this.description    = description;
        this.lastMonthNumOfBuyers = lastMonthNumOfBuyers;
        this.numOfBuyers    = numOfBuyers;
        this.active         = active;
        this.deleted        = deleted;
        this.createdDate    = createdDate;
        this.theCategory    = theCategory;
    }

    
    //Getters and Setters
    public boolean isSelling() {
        return selling;
    }

    public void setSelling(boolean selling) {
        this.selling = selling;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
    
    public int getLastMonthNumOfBuyers() {
        return lastMonthNumOfBuyers;
    }

    public void setLastMonthNumOfBuyers(int lastMonthNumOfBuyers) {
        this.lastMonthNumOfBuyers = lastMonthNumOfBuyers;
    }

    public ItemDetailsState getLatestItemDetails() {
        return latestItemDetails;
    }

    public void setLatestItemDetails(ItemDetailsState latestItemDetails) {
        this.latestItemDetails = latestItemDetails;
    }

    public List<ItemDetailsState> getListOfItemDetails() {
        return listOfItemDetails;
    }

    public void setListOfItemDetails(List<ItemDetailsState> listOfItemDetails) {
        this.listOfItemDetails = listOfItemDetails;
    }

    public long getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(long createdDate) {
        this.createdDate = createdDate;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public List<FileState> getListOfPictures() {
        return listOfPictures;
    }

    public void setListOfPictures(List<FileState> listOfPictures) {
        this.listOfPictures = listOfPictures;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNumOfBuyers() {
        return numOfBuyers;
    }

    public void setNumOfBuyers(int numOfBuyers) {
        this.numOfBuyers = numOfBuyers;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    public ItemCategoryState getCategory() {
        return theCategory;
    }

    public void setCategory(ItemCategoryState theCategory) {
        this.theCategory = theCategory;
    }
}
